import request from '@/utils/request'
import scope from './scope'
const apiPrefix = `${process.env.VUE_APP_BASE_API}/${scope}/stockin/`

// 仓库管理
export const getStockIn = (params, config = {}) => {
  return request.get(apiPrefix + 'get', { params: params }, config)
}
// 根据物料id获取物料规格信息
export const getMaterInfo = (params, config = {}) => {
  return request.get(apiPrefix + 'getmaterinfo', { params: params }, config)
}
export const getStockInListPage = (params, config = {}) => {
  params = params || {}
  return request.post(apiPrefix + 'getpage', params, config)
}

export const addStockIn = (params, config = {}) => {
  return request.post(apiPrefix + 'add', params, config)
}
export const editStockIn = (params, config = {}) => {
  return request.put(apiPrefix + 'update', params, config)
}
export const removeStockIn = (params, config = {}) => {
  return request.delete(apiPrefix + 'softdelete', { params: params }, config)
}
export const batchRemoveStockIn = (params, config = {}) => {
  return request.put(apiPrefix + 'BatchsoftDelete', params, config)
}
export const getMaterList = (params, config = {}) => {
  return request.get(apiPrefix + 'getmaterlist', { params: params }, config)
}
// 保留
export const getxbcLocationList = (params, config = {}) => {
  return request.get(apiPrefix + 'getlocationlist', { params: params }, config)
}
